{% extends "base.phtml" %}


{% block content %}

<div class="box box-primary">
    <div class="box-header with-border">
        <h3 class="box-title"></h3>
    </div>

    <form class="form-horizontal" action="saveCampaign">
        <div class="box-body">
            <div class="form-group">
                <label class="col-sm-2 control-label">活动名称</label>

                <div class="col-sm-3">
                    <input type="text" name="campaign_name" value="{{data?data.campaign_name:''}}" class="form-control col-xs-3" placeholder="">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">活动标识</label>

                <div class="col-sm-3">
                    <input type="text" name="markname" value="{{data?data.markname:''}}" class="form-control col-xs-3" placeholder="">
                </div>
            </div>

            <div class="form-group uploadimg">
                <label class="col-sm-2 control-label">活动头图</label>
                <div class="col-sm-2">
                    <div class="filepicker" data-name="cover" data-pic="{{data?data.cover:''}}">上传</div>
                </div>
                <div class="col-sm-8 filelist"></div>
            </div>

            <div class="form-group uploadimg">
                <label class="col-sm-2 control-label">活动通栏广告</label>
                <div class="col-sm-2">
                    <div class="filepicker" data-name="adcover" data-pic="{{data?data.adcover:''}}">上传</div>
                </div>
                <div class="col-sm-8 filelist"></div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">有效期设定</label>
                <div class="col-sm-3">
                    <input style="height:35px;" name="stime"
                           value="{{data?date('Y-m-d H:i:s',data.stime):''}}" placeholder="请选择日期"
                           class="laydate-icon"
                           onclick="laydate({'istime': true, 'format': 'YYYY-MM-DD hh:mm:ss'})">
                    至
                    <input style="height:35px;" name="etime"
                           value="{{data?date('Y-m-d H:i:s',data.etime):''}}" placeholder="请选择日期"
                           class="laydate-icon"
                           onclick="laydate({'istime': true, 'format': 'YYYY-MM-DD hh:mm:ss'})">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">浏览量</label>
                <div class="col-sm-3">
                    <input type="text" name="views" value="{{data?data.views:'0'}}" class="form-control col-xs-3" placeholder="">
                </div>
            </div>

        </div>

        <div class="box-footer text-center">
            <input type="hidden" value="{{data?data.id:0}}" name="id">
            <button class="btn btn-info submit">保存</button>
        </div>

    </form>
</div>
{% endblock %}
